package com.adapter.classadpter;

/**
 * @author 薛虎
 * @date 2021/1/7 13:11
 */
public class Phone {

    //充电
    public void charging(IVoltage5V iVoltage5V) {
        if (iVoltage5V.output5V() == 5) {
            System.out.println("电压为5v可以充电");
        } else if (iVoltage5V.output5V() > 5) {
            System.out.println("电压大于5v,无法充电");
        }
    }
}
